import service from '@/utils/request'

export const getPostsList = () => {
  return service({
    method: 'get',
    url: '/posts'
  })
}
export const getPostDetailsById = (id) => {
  return service({
    method: 'get',
    url: `/posts/${id}`
  })
}
export const updatePostsById = (id, data) => {
  return service({
    method: 'put',
    url: `/posts/${id}`,
    data
  })
}
